package supermarket.model;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlRootElement;

import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
@XmlRootElement
public class Product implements Serializable {

    private Integer id;

    private String name;

    private String company;

    private Integer price;

    private Integer qty;

    private String category;

    private Integer image;

    /** full constructor */
    public Product(Integer id, String name, String company, Integer price, Integer qty, String category, Integer image) {
        this.id = id;
        this.name = name;
        this.company = company;
        this.price = price;
        this.qty = qty;
        this.category = category;
        this.image = image;
    }

    /** default constructor */
    public Product() {
    }

    /** minimal constructor */
    public Product(String name) {
        this.name = name;
    }
    
    public Product(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCompany() {
        return this.company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public Integer getPrice() {
        return this.price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getQty() {
        return this.qty;
    }

    public void setQty(Integer qty) {
        this.qty = qty;
    }

    public String getCategory() {
        return this.category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Integer getImage() {
        return this.image;
    }

    public void setImage(Integer image) {
        this.image = image;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("id", getId())
            .toString();
    }

}
